package com.project.ToDone;

/**
 * Information Holder for a specified event
 * 
 * @author Matthew Guzdial
 *
 */
public class Event {
	String date, time, type, location, descriptionShort, descriptionLong;
	boolean recurring, completed;
	int id;
	
	/**
	 * Takes in all information and sets it to class instances
	 * 
	 * 
	 * @param recurring
	 * @param date
	 * @param time
	 * @param type
	 * @param location
	 * @param descriptionShort
	 * @param descriptionLong
	 */
	public Event(boolean recurring, boolean completed, String date, String time, String type, String location, String descriptionShort, String descriptionLong){
		this.recurring=recurring;
		this.completed=completed;
		this.date=date;
		this.time=time;
		this.type=type;
		this.location=location;
		this.descriptionShort=descriptionShort;
		this.descriptionLong=descriptionLong;
		id=-1;
		
	}
	
	
	//ALL THE GETTERS
	
	/**
	 * Getters returning recurring
	 * 
	 * @return boolean to determine if recurring, true for yes, false for no
	 */
	public boolean getRecurring(){
		return recurring;
	}
	
	/**
	 * Getter for the date
	 * 
	 * @return
	 */
	public String getDate(){
		return date;
	}
	
	public boolean getCompleted()
	{
		return completed;
	}
	
	/**
	 * Getter for time
	 * 
	 * @return
	 */
	public String getTime(){
		return time;
	}
	
	/**
	 * Getter for Event type
	 * 
	 * @return
	 */
	public String getType(){
		return type;
	}
	
	/**
	 * Getter for event location
	 * 
	 * @return
	 */
	public String getLocation(){
		return location;
	}
	
	/**
	 * Getter for short description (name)
	 * 
	 * @return
	 */
	public String getDescriptionShort(){
		return descriptionShort;
	}
	
	/**
	 * Getter for long description
	 * 
	 * @return
	 */
	public String getDescriptionLong(){
		return descriptionLong;
	}
	
	public String toString()
	{
		return descriptionShort;
	}
	
	
	/**
	 * Toggle the completion field of the event
	 */
	public void toggleCompletion()
	{
		completed = !completed;
	}
	
	public void setID(int id){
		this.id=id;
	}
	
	public int getID(){
		return id;
	}
	

}
